Skip to main content

Passport Verification API

This document outlines the details of the Passport Verification API.

API Description

Objective

The Passport Verification API authenticates a user by verifying their identity details against the central database maintained by the Ministry of External Affairs (Passport Seva).

InputOutput
The name and the passport details of the customer.The outcome of comparing the input details with the information retrieved from the matching passport record.

API URL

https://ind-verify.hyperverge.co/api/verifyPassport

API Endpoint

verifyPassport

Overview

The Passport Verification API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the Passport Verification API.

API Request Details

Method - POST

Headers

HeaderMandatory / OptionalDescriptionInput Format
content-typeMandatoryThis parameter defines the media type for the request payload.application/json
appIdMandatoryThe application ID shared by HyperVergeNot Applicable - this is a unique value
appKeyMandatoryThe application key shared by HyperVergeNot Applicable - this is a unique value
transactionIdMandatoryThe unique ID for the customer journeyNot Applicable - this is a unique value related to a transaction in your application

Input

The following table provides the details of the parameters required for the Passport Verification API's request body:

ParameterMandatory / OptionalTypeDescriptionInput FormatDefault Value
fileNoMandatorystringThe passport reference file number.Not ApplicableNot Applicable
dobMandatorystringThe date of birth of the customer.Not ApplicableNot Applicable
doiMandatorystringThe date of issue of the passport.Not ApplicableNot Applicable
passportNoMandatorystringThe passport number of the customer.Not ApplicableNot Applicable
nameMandatorystringThe name of the customer.Not ApplicableNot Applicable

Request

The following code snippet demonstrates a standard curl request for the Passport Verification API:

curl --location --request POST 'https://ind-verify.hyperverge.co/api/verifyPassport' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"fileNo": "<passport_reference_file_number>",
"dob": "<Date_of_Birth>",
"doi": "<Date_of_issue>",
"passportNo": "<Passport_Number>",
"name": "<Name_on_Passport>"
}'

Success Response

The following is a sample success response from the Passport Verification API:

{
"status": "success",
"statusCode": "200",
"result": {
"applicationDate": "10/10/1000",
"dateOfIssue": {
"dispatchedOnFromSource": "10/10/1000",
"dateOfIssueMatch": true
},
"passportNumber": {
"passportNumberFromSource": "12345678",
"passportNumberMatch": true
},
"name": {
"nameMatch": true,
"surnameFromPassport": "SAMPLE",
"nameScore": 1,
"nameFromPassport": "SAMPLE SAMPLE"
},
"typeOfApplication": "SAMPLE"
}
}

Failure Response

The following is a sample response from the Passport Verification API when no matching record is found for the provided input:

{
"status": "failure",
"statusCode": "422",
"error": "Invalid value passed for an input"
}
info

Although the error message reads "Invalid value passed for an input", this response indicates that no matching record was found in the database for the provided details. The input values themselves may be valid.

Error Responses

The following are the sample error responses for the Passport Verification API:

{
"status": "failure",
"statusCode": "400",
"error": "fileNo is not allowed to be empty"
}
{
"status": "failure",
"statusCode": "422",
"error": "Invalid value passed for an input"
}

Error Response Details

A failure or error response contains a failure status with a relevant status code and error message. The following table lists all error responses:

Status CodeError MessageError DescriptionError Resolution
400fileNo is not allowed to be emptyThe fileNo in the request contains no value.Provide a valid passport reference file number in the request
400passportNo is not allowed to be emptyThe passportNo is a mandatory input in the request.Provide a valid passport number in the request
400dob is requiredThe dob parameter is a mandatory input in the request.Provide a valid date of birth in the request
400fileNo is requiredThe fileNo is a mandatory input in the request.Provide a valid passport reference file number in the request
400dob must be a number of milliseconds or valid date stringProvide the date of birth as a valid date string or number of milliseconds
422Invalid value passed for an inputNo matching record was found in the database for the provided input. This does not indicate an invalid input, but rather the absence of a matching passport record.Verify that the provided passport details are correct and correspond to an existing record
500Unexpected Server ErrorThere is an issue with the service. Kindly contact the HyperVerge Team for support.Contact the HyperVerge team for investigation and resolution
504Govt. database service unavailableThe service is currently unavailable. Kindly retry the request in some time.Retry the request after some time. If the issue persists, contact the HyperVerge team
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: